home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
C/C++ Users Group Library 1996 July
/
C-C++ Users Group Library July 1996.iso
/
listings
/
v_11_05
/
1105094a
< prev
next >
Wrap
Text File
|
1993-03-03
|
375b
|
22 lines
#include <fcntl.h>
#include <sys\stat.h>
#include <dos.h>
#include <io.h>
#include <stdio.h>
void main()
{
int file;
int count_written;
file = _open("TEMP", O_RDWR);
if (file < 0)
{
printf("Error %d in file open\n", errno);
perror("");
}
count_written = _write(file,&file,0);
printf("Count written %d", count_written);
_close(file);
}